<?php

namespace siafei\Reporting;


use Illuminate\Support\ServiceProvider as LaravelServiceProvider;
use siafei\Reporting\ExceptionHandler\ExceptionHandler;


/**
 * Class ServiceProvider.
 *
 * @author overtrue <i@overtrue.me>
 */
class ReportingProvider extends LaravelServiceProvider
{
    /**
     * Boot the provider.
     */
    public function boot()
    {
        $this->registerException();
    }

    /**
     * 注册异常服务
     */
    protected function registerException()
    {
        $this->app->singleton(
            \Illuminate\Contracts\Debug\ExceptionHandler::class,
            ExceptionHandler::class
        );

        $this->app->singleton('siafei.report', function ($app) {
            return new ReportManager($app);
        });

    }

    /**
     * Register the provider.
     */
    public function register()
    {
    }
}